import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { Button,Form,Input,FormItem,Message,Container,Header,Aside,Main,Menu,Submenu,MenuItem,
Breadcrumb,BreadcrumbItem,Card,Row,Col,Table,TableColumn,Switch,Tooltip,Pagination,Dialog,MessageBox,Tag,
Tree,Select,Option,Cascader,Alert,Tabs,TabPane,Steps,Step,Checkbox,CheckboxGroup,Upload,Image,
Timeline,TimelineItem } from 'element-ui';
Vue.component(Button.name, Button);
/*表单元素*/
Vue.use(Form);
Vue.use(Input);
Vue.use(FormItem);
Vue.use(Container);
/*布局容器*/
Vue.use(Header);
Vue.use(Aside);
Vue.use(Main);
/*导航菜单*/
Vue.use(Menu);
Vue.use(Submenu);
Vue.use(MenuItem);
/*面包屑导航*/
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
/*卡片视图*/
Vue.use(Card);
/*栅格系统*/
Vue.use(Row);
Vue.use(Col);
/*表格*/
Vue.use(Table);
Vue.use(TableColumn);
/*开关*/
Vue.use(Switch);
/*文字提示*/
Vue.use(Tooltip);
/*分页*/
Vue.use(Pagination);
/*对话框*/
Vue.use(Dialog);
/*标签*/
Vue.use(Tag);
/*树型控件*/
Vue.use(Tree);
/*选择框*/
Vue.use(Select);
Vue.use(Option);
/*级联选择框*/
Vue.use(Cascader);
/*警告*/
Vue.use(Alert);
/*标签页*/
Vue.use(Tabs);
Vue.use(TabPane);
/*步骤条*/
Vue.use(Steps);
Vue.use(Step);
/*复选框*/
Vue.use(Checkbox);
/*复选框组*/
Vue.use(CheckboxGroup);
/*图片上传*/
Vue.use(Upload);
/*图片预览*/
Vue.use(Image);
/*时间线*/
Vue.use(Timeline);
Vue.use(TimelineItem);

/*Vue-Quill-Editor 富文本编辑器*/
import VueQuillEditor from 'vue-quill-editor'
// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor);


import ZkTable from 'vue-table-with-tree-grid'
Vue.use(ZkTable);

Vue.prototype.$message=Message;
Vue.prototype.$confirm=MessageBox.confirm;

/*全局样式表*/
import './assets/css/global.css';
/*字体图标*/
import './assets/fonts/iconfont.css';

Vue.config.productionTip = false;


/*全局时间过滤器*/
Vue.filter('dataFormat',function (val) {
  const dt=new Date(val)
  var year=dt.getFullYear();
  var month=(dt.getMonth()+1+'').padStart(2,0);
  var day=(dt.getDay()+1+'').padStart(2,0);
  var hour=(dt.getHours()+1+'').padStart(2,0);
  var minutes=(dt.getMinutes()+1+'').padStart(2,0);
  return `${year}-${month}-${day} ${hour}:${minutes}`;
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
